from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from matplotlib import pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei'] # 中文
plt.rcParams['axes.unicode_minus'] = False # 负号

def f(t,l):
    return 70.5-((9.18-0.36*l)/t)

fig = plt.figure()
ax = Axes3D(fig)
x=np.arange(1,50,1)
y=np.arange(1,50,1)
X,Y = np.meshgrid(x, y)
Z=f(X,Y)
plt.xlabel('x')
plt.ylabel('y')
ax.plot_surface(x, y, Z, rstride=1, cstride=1, cmap='rainbow')
plt.xlabel('等待时间')  # X轴标签
plt.ylabel('路程')  # Y轴标签
plt.show()